<template>
  <div class="container">
    <p class="title">
      <span style="color: #fff"> 安徽省特种设备检测院电子评分系统 </span>
    </p>
    <div class="table_container">
      <div class="main-title">
        <img src="@/assets/urban-development-indicators/icon.png" alt="" />
        <div class="text">观光车和观光列车场内道路考试评分表</div>
      </div>
      <table
        cellspacing="0"
        cellpadding="0"
        style="border-collapse: collapse; margin: 0 auto"
      >
        <tr style="height: 14.15pt">
          <td colspan="2" style="width: 66.45pt">
            <p class="label">
              <span class="labelFont">考号</span>
            </p>
          </td>
          <td style="width: 160.15pt">
            <p class="label">
              <span class="labelFont">{{ examCandidate.number }}</span>
            </p>
          </td>
          <td rowspan="4" style="width: 73pt">
            <p class="label">
              <span class="labelFont">得分</span>
            </p>
          </td>
          <td colspan="3" rowspan="4" style="width: 198.65pt">
            <p class="label">
              <span class="labelFont">{{ sum < 0 ? 0 : sum }}</span>
            </p>
          </td>
        </tr>
        <tr style="height: 14.15pt">
          <td colspan="2" style="width: 66.45pt">
            <p class="label">
              <span class="labelFont">姓名</span>
            </p>
          </td>
          <td style="width: 160.15pt">
            <p class="label">
              <span class="labelFont">{{ examCandidate.name }}</span>
            </p>
          </td>
        </tr>
        <tr style="height: 14.15pt">
          <td colspan="2" style="width: 66.45pt">
            <p class="label">
              <span class="labelFont">身份证号</span>
            </p>
          </td>
          <td style="width: 160.15pt">
            <p class="label">
              <span class="labelFont">{{ examCandidate.sfzNumber }}</span>
            </p>
          </td>
        </tr>
        <tr style="height: 14.15pt">
          <td colspan="2" style="width: 66.45pt">
            <p class="label">
              <span class="labelFont">考试批次</span>
            </p>
          </td>
          <td style="width: 160.15pt">
            <p class="label">
              <span
                style="
                  font-family: 宋体;
                  font-size: 10.5pt;
                  font-style: normal;
                  text-decoration: none;
                "
                >{{ examCandidate.batchNumber }}</span
              >
            </p>
          </td>
        </tr>
        <tr style="height: 14.15pt">
          <td style="width: 32.7pt">
            <p class="label">
              <span class="labelFont">序号</span>
            </p>
          </td>
          <td style="width: 22.95pt">
            <p class="label">
              <span class="labelFont">流程</span>
            </p>
          </td>
          <td colspan="2" style="width: 243.95pt">
            <p class="label">
              <span class="labelFont">项   目</span>
            </p>
          </td>
          <td style="width: 59.2pt">
            <p class="label">
              <span class="labelFont">扣分标准</span>
            </p>
          </td>
          <td style="width: 67.6pt">
            <p class="label">
              <span class="labelFont">违例次数</span>
            </p>
          </td>
          <td style="width: 50.25pt">
            <p class="label">
              <span class="labelFont">扣分</span>
            </p>
          </td>
        </tr>
        <tr style="height: 14.15pt">
          <td style="width: 32.7pt">
            <p class="label">
              <span class="labelFont">1</span>
            </p>
          </td>
          <td rowspan="5" style="width: 22.95pt">
            <p style="margin: 0pt">
              <span class="labelFont">起步</span>
            </p>
          </td>
          <td colspan="2" style="width: 243.95pt">
            <p style="margin: 0pt">
              <span class="labelFont">启动前，</span
              ><span class="labelFont">未检查车辆状态</span>
            </p>
          </td>
          <td style="width: 59.2pt">
            <p class="label">
              <span class="labelFont">扣</span><span class="labelFont">2</span
              ><span class="labelFont">分</span>
            </p>
          </td>
          <td style="vertical-align: top; width: 67.6pt">
            <p class="label">
              <span class="readonlyText">
                <input
                  type="number"
                  oninput="if(value<=0)value=''"
                  name=""
                  v-model="oneNum"
                />
              </span>
            </p>
          </td>
          <td style="vertical-align: top; width: 50.25pt">
            <p class="label">
              <span class="readonlyText">{{
                oneScore == 0 ? "" : oneScore
              }}</span>
            </p>
          </td>
        </tr>
        <tr style="height: 14.15pt">
          <td style="width: 32.7pt">
            <p class="label">
              <span class="labelFont">2</span>
            </p>
          </td>
          <td colspan="2" style="width: 243.95pt">
            <p style="margin: 0pt">
              <span class="labelFont">起步前，不鸣号</span>
            </p>
          </td>
          <td style="width: 59.2pt">
            <p class="label">
              <span class="labelFont">扣</span><span class="labelFont">2</span
              ><span class="labelFont">分</span>
            </p>
          </td>
          <td style="vertical-align: top; width: 67.6pt">
            <p class="label">
              <span class="readonlyText">
                <input
                  type="number"
                  oninput="if(value<=0)value=''"
                  name=""
                  v-model="twoNum"
              /></span>
            </p>
          </td>
          <td style="vertical-align: top; width: 50.25pt">
            <p class="label">
              <span class="readonlyText">{{
                twoScore == 0 ? "" : twoScore
              }}</span>
            </p>
          </td>
        </tr>
        <tr style="height: 14.15pt">
          <td style="width: 32.7pt">
            <p class="label">
              <span class="labelFont">3</span>
            </p>
          </td>
          <td colspan="2" style="width: 243.95pt">
            <p style="margin: 0pt">
              <span class="labelFont">起步时，未松开驻车制动</span>
            </p>
          </td>
          <td style="width: 59.2pt">
            <p class="label">
              <span class="labelFont">扣5分</span>
            </p>
          </td>
          <td style="vertical-align: top; width: 67.6pt">
            <p class="label">
              <span class="readonlyText">
                <input
                  type="number"
                  oninput="if(value<=0)value=''"
                  name=""
                  v-model="threeNum"
              /></span>
            </p>
          </td>
          <td style="vertical-align: top; width: 50.25pt">
            <p class="label">
              <span class="readonlyText">{{
                threeScore == 0 ? "" : threeScore
              }}</span>
            </p>
          </td>
        </tr>
        <tr style="height: 14.15pt">
          <td style="width: 32.7pt">
            <p class="label">
              <span class="labelFont">4</span>
            </p>
          </td>
          <td colspan="2" style="width: 243.95pt">
            <p style="margin: 0pt">
              <span class="labelFont">起步不平稳</span>
            </p>
          </td>
          <td style="width: 59.2pt">
            <p class="label">
              <span class="labelFont">扣</span
              ><span class="labelFont">5分</span>
            </p>
          </td>
          <td style="vertical-align: top; width: 67.6pt">
            <p class="label">
              <span class="readonlyText">
                <input
                  type="number"
                  oninput="if(value<=0)value=''"
                  name=""
                  v-model="fourNum"
              /></span>
            </p>
          </td>
          <td style="vertical-align: top; width: 50.25pt">
            <p class="label">
              <span class="readonlyText">{{
                fourScore == 0 ? "" : fourScore
              }}</span>
            </p>
          </td>
        </tr>
        <tr style="height: 14.15pt">
          <td style="width: 32.7pt">
            <p class="label">
              <span class="labelFont">5</span>
            </p>
          </td>
          <td colspan="2" style="width: 243.95pt">
            <p style="margin: 0pt">
              <span class="labelFont">未提示乘客注意事项</span>
            </p>
          </td>
          <td style="width: 59.2pt">
            <p class="label">
              <span class="labelFont">扣</span
              ><span class="labelFont">5分</span>
            </p>
          </td>
          <td style="vertical-align: top; width: 67.6pt">
            <p class="label">
              <span class="readonlyText">
                <input
                  type="number"
                  oninput="if(value<=0)value=''"
                  name=""
                  v-model="fiveNum"
              /></span>
            </p>
          </td>
          <td style="vertical-align: top; width: 50.25pt">
            <p class="label">
              <span class="readonlyText">{{
                fiveScore == 0 ? "" : fiveScore
              }}</span>
            </p>
          </td>
        </tr>
        <tr style="height: 14.15pt">
          <td style="width: 32.7pt">
            <p class="label">
              <span class="labelFont">6</span>
            </p>
          </td>
          <td rowspan="10" style="width: 22.95pt">
            <p style="margin: 0pt; orphans: 0; widows: 0">
              <span class="labelFont">行驶</span>
            </p>
          </td>
          <td colspan="2" style="width: 243.95pt">
            <p style="margin: 0pt">
              <span class="labelFont">换挡不规范</span>
            </p>
          </td>
          <td style="width: 59.2pt">
            <p class="label">
              <span class="labelFont">扣5分</span
              ><span class="labelFont">/次</span>
            </p>
          </td>
          <td style="vertical-align: top; width: 67.6pt">
            <p class="label">
              <span class="readonlyText">
                <input
                  type="number"
                  oninput="if(value<=0)value=''"
                  name=""
                  v-model="sixNum"
              /></span>
            </p>
          </td>
          <td style="vertical-align: top; width: 50.25pt">
            <p class="label">
              <span class="readonlyText">{{
                sixScore == 0 ? "" : sixScore
              }}</span>
            </p>
          </td>
        </tr>
        <tr style="height: 14.15pt">
          <td style="width: 32.7pt">
            <p class="label">
              <span class="labelFont">7</span>
            </p>
          </td>
          <td colspan="2" style="width: 243.95pt">
            <p style="margin: 0pt">
              <span class="labelFont">离合器使用不规范</span>
            </p>
          </td>
          <td style="width: 59.2pt">
            <p class="label">
              <span class="labelFont">扣5分</span
              ><span class="labelFont">/次</span>
            </p>
          </td>
          <td style="vertical-align: top; width: 67.6pt">
            <p class="label">
              <span class="readonlyText">
                <input
                  type="number"
                  oninput="if(value<=0)value=''"
                  name=""
                  v-model="sevenNum"
              /></span>
            </p>
          </td>
          <td style="vertical-align: top; width: 50.25pt">
            <p class="label">
              <span class="readonlyText">{{
                sevenScore == 0 ? "" : sevenScore
              }}</span>
            </p>
          </td>
        </tr>
        <tr style="height: 14.15pt">
          <td style="width: 32.7pt">
            <p class="label">
              <span class="labelFont">8</span>
            </p>
          </td>
          <td colspan="2" style="width: 243.95pt">
            <p style="margin: 0pt">
              <span class="labelFont">方向灯使用不规范</span>
            </p>
          </td>
          <td style="width: 59.2pt">
            <p class="label">
              <span class="labelFont">扣</span><span class="labelFont">5</span
              ><span class="labelFont">分</span
              ><span class="labelFont">/次</span>
            </p>
          </td>
          <td style="vertical-align: top; width: 67.6pt">
            <p class="label">
              <span class="readonlyText">
                <input
                  type="number"
                  oninput="if(value<=0)value=''"
                  name=""
                  v-model="eightNum"
              /></span>
            </p>
          </td>
          <td style="vertical-align: top; width: 50.25pt">
            <p class="label">
              <span class="readonlyText">{{
                eightScore == 0 ? "" : eightScore
              }}</span>
            </p>
          </td>
        </tr>
        <tr style="height: 14.15pt">
          <td style="width: 32.7pt">
            <p class="label">
              <span class="labelFont">9</span>
            </p>
          </td>
          <td colspan="2" style="width: 243.95pt">
            <p style="margin: 0pt">
              <span class="labelFont">掉头、转向时，打急舵</span>
            </p>
          </td>
          <td style="width: 59.2pt">
            <p class="label">
              <span class="labelFont">扣</span><span class="labelFont">5</span
              ><span class="labelFont">分</span
              ><span class="labelFont">/次</span>
            </p>
          </td>
          <td style="vertical-align: top; width: 67.6pt">
            <p class="label">
              <span class="readonlyText">
                <input
                  type="number"
                  oninput="if(value<=0)value=''"
                  name=""
                  v-model="nineNum"
              /></span>
            </p>
          </td>
          <td style="vertical-align: top; width: 50.25pt">
            <p class="label">
              <span class="readonlyText">{{
                nineScore == 0 ? "" : nineScore
              }}</span>
            </p>
          </td>
        </tr>
        <tr style="height: 14.15pt">
          <td style="width: 32.7pt">
            <p class="label">
              <span class="labelFont">10</span>
            </p>
          </td>
          <td colspan="2" style="width: 243.95pt">
            <p style="margin: 0pt">
              <span class="labelFont">行车制动使用不规范</span>
            </p>
          </td>
          <td style="width: 59.2pt">
            <p class="label">
              <span class="labelFont">扣</span><span class="labelFont">10</span
              ><span class="labelFont">分</span
              ><span class="labelFont">/次</span>
            </p>
          </td>
          <td style="vertical-align: top; width: 67.6pt">
            <p class="label">
              <span class="readonlyText">
                <input
                  type="number"
                  oninput="if(value<=0)value=''"
                  name=""
                  v-model="tenNum"
              /></span>
            </p>
          </td>
          <td style="vertical-align: top; width: 50.25pt">
            <p class="label">
              <span class="readonlyText">{{
                tenScore == 0 ? "" : tenScore
              }}</span>
            </p>
          </td>
        </tr>
        <tr style="height: 14.15pt">
          <td style="width: 32.7pt">
            <p class="label">
              <span class="labelFont">11</span>
            </p>
          </td>
          <td colspan="2" style="width: 243.95pt">
            <p style="margin: 0pt">
              <span class="labelFont">熄火</span
              ><span class="labelFont">1次</span>
            </p>
          </td>
          <td style="width: 59.2pt">
            <p class="label">
              <span class="labelFont">扣</span><span class="labelFont">15</span
              ><span class="labelFont">分</span
              ><span class="labelFont">/次</span>
            </p>
          </td>
          <td style="vertical-align: top; width: 67.6pt">
            <p class="label">
              <span class="readonlyText">
                <input
                  type="number"
                  oninput="if(value<=0)value=''"
                  name=""
                  v-model="elevenNum"
              /></span>
            </p>
          </td>
          <td style="vertical-align: top; width: 50.25pt">
            <p class="label">
              <span class="readonlyText">{{
                elevenScore == 0 ? "" : elevenScore
              }}</span>
            </p>
          </td>
        </tr>
        <tr style="height: 14.15pt">
          <td style="width: 32.7pt">
            <p class="label">
              <span class="labelFont">12</span>
            </p>
          </td>
          <td colspan="2" style="width: 243.95pt">
            <p style="margin: 0pt">
              <span class="labelFont">坡道停车时，距离停车线误差大于0.2m</span>
            </p>
          </td>
          <td style="width: 59.2pt">
            <p class="label">
              <span class="labelFont">扣</span><span class="labelFont">10</span
              ><span class="labelFont">分</span
              ><span class="labelFont">/次</span>
            </p>
          </td>
          <td style="vertical-align: top; width: 67.6pt">
            <p class="label">
              <span class="readonlyText">
                <input
                  type="number"
                  oninput="if(value<=0)value=''"
                  name=""
                  v-model="twelveNum"
              /></span>
            </p>
          </td>
          <td style="vertical-align: top; width: 50.25pt">
            <p class="label">
              <span class="readonlyText">{{
                twelveScore == 0 ? "" : twelveScore
              }}</span>
            </p>
          </td>
        </tr>
        <tr style="height: 14.15pt">
          <td style="width: 32.7pt">
            <p class="label">
              <span class="labelFont">13</span>
            </p>
          </td>
          <td colspan="2" style="width: 243.95pt">
            <p style="margin: 0pt">
              <span class="labelFont">坡道起步时，溜车大于</span
              ><span class="labelFont">0.2m，但不大于0.5m</span>
            </p>
          </td>
          <td style="width: 59.2pt">
            <p class="label">
              <span class="labelFont">扣</span><span class="labelFont">10</span
              ><span class="labelFont">分</span
              ><span class="labelFont">/次</span>
            </p>
          </td>
          <td style="vertical-align: top; width: 67.6pt">
            <p class="label">
              <span class="readonlyText">
                <input
                  type="number"
                  oninput="if(value<=0)value=''"
                  name=""
                  v-model="thirteenNum"
              /></span>
            </p>
          </td>
          <td style="vertical-align: top; width: 50.25pt">
            <p class="label">
              <span class="readonlyText">{{
                thirteenScore == 0 ? "" : thirteenScore
              }}</span>
            </p>
          </td>
        </tr>
        <tr style="height: 14.15pt">
          <td style="width: 32.7pt">
            <p class="label">
              <span class="labelFont">14</span>
            </p>
          </td>
          <td colspan="2" style="width: 243.95pt">
            <p style="margin: 0pt">
              <span class="labelFont">碰擦桩杆</span>
            </p>
          </td>
          <td style="width: 59.2pt">
            <p class="label">
              <span class="labelFont">扣</span><span class="labelFont">10</span
              ><span class="labelFont">分</span
              ><span class="labelFont">/次</span>
            </p>
          </td>
          <td style="vertical-align: top; width: 67.6pt">
            <p class="label">
              <span class="readonlyText">
                <input
                  type="number"
                  oninput="if(value<=0)value=''"
                  name=""
                  v-model="fourteenNum"
              /></span>
            </p>
          </td>
          <td style="vertical-align: top; width: 50.25pt">
            <p class="label">
              <span class="readonlyText">{{
                fourteenScore == 0 ? "" : fourteenScore
              }}</span>
            </p>
          </td>
        </tr>
        <tr style="height: 14.15pt">
          <td style="width: 32.7pt">
            <p class="label">
              <span class="labelFont">15</span>
            </p>
          </td>
          <td colspan="2" style="width: 243.95pt">
            <p style="margin: 0pt">
              <span class="labelFont">压边线</span>
            </p>
          </td>
          <td style="width: 59.2pt">
            <p class="label">
              <span class="labelFont">扣</span><span class="labelFont">10</span
              ><span class="labelFont">分</span
              ><span class="labelFont">/次</span>
            </p>
          </td>
          <td style="vertical-align: top; width: 67.6pt">
            <p class="label">
              <span class="readonlyText">
                <input
                  type="number"
                  oninput="if(value<=0)value=''"
                  name=""
                  v-model="fifteenNum"
              /></span>
            </p>
          </td>
          <td style="vertical-align: top; width: 50.25pt">
            <p class="label">
              <span class="readonlyText">{{
                fifteenScore == 0 ? "" : fifteenScore
              }}</span>
            </p>
          </td>
        </tr>
        <tr style="height: 14.15pt">
          <td style="width: 32.7pt">
            <p class="label">
              <span class="labelFont">16</span>
            </p>
          </td>
          <td rowspan="3" style="width: 22.95pt">
            <p style="margin: 0pt">
              <span class="labelFont">停车</span>
            </p>
          </td>
          <td colspan="2" style="width: 243.95pt">
            <p style="margin: 0pt">
              <span class="labelFont">操作杆未复位</span>
            </p>
          </td>
          <td style="width: 59.2pt">
            <p class="label">
              <span class="labelFont">扣</span><span class="labelFont">5</span
              ><span class="labelFont">分</span>
            </p>
          </td>
          <td style="vertical-align: top; width: 67.6pt">
            <p class="label">
              <span class="readonlyText">
                <input
                  type="number"
                  oninput="if(value<=0)value=''"
                  name=""
                  v-model="sixteenNum"
              /></span>
            </p>
          </td>
          <td style="vertical-align: top; width: 50.25pt">
            <p class="label">
              <span class="readonlyText">{{
                sixteenScore == 0 ? "" : sixteenScore
              }}</span>
            </p>
          </td>
        </tr>
        <tr style="height: 14.15pt">
          <td style="width: 32.7pt">
            <p class="label">
              <span class="labelFont">17</span>
            </p>
          </td>
          <td colspan="2" style="width: 243.95pt">
            <p style="margin: 0pt">
              <span class="labelFont">未切断电源</span>
            </p>
          </td>
          <td style="width: 59.2pt">
            <p class="label">
              <span class="labelFont">扣</span><span class="labelFont">5</span
              ><span class="labelFont">分</span>
            </p>
          </td>
          <td style="vertical-align: top; width: 67.6pt">
            <p class="label">
              <span class="readonlyText">
                <input
                  type="number"
                  oninput="if(value<=0)value=''"
                  name=""
                  v-model="seventeenNum"
              /></span>
            </p>
          </td>
          <td style="vertical-align: top; width: 50.25pt">
            <p class="label">
              <span class="readonlyText">{{
                seventeenScore == 0 ? "" : seventeenScore
              }}</span>
            </p>
          </td>
        </tr>
        <tr style="height: 14.15pt">
          <td style="width: 32.7pt">
            <p class="label">
              <span class="labelFont">18</span>
            </p>
          </td>
          <td colspan="2" style="width: 243.95pt">
            <p style="margin: 0pt">
              <span class="labelFont">未拉紧驻车制动</span>
            </p>
          </td>
          <td style="width: 59.2pt">
            <p class="label">
              <span class="labelFont">扣</span><span class="labelFont">5</span
              ><span class="labelFont">分</span>
            </p>
          </td>
          <td style="vertical-align: top; width: 67.6pt">
            <p class="label">
              <span class="readonlyText">
                <input
                  type="number"
                  oninput="if(value<=0)value=''"
                  name=""
                  v-model="eighteenNum"
              /></span>
            </p>
          </td>
          <td style="vertical-align: top; width: 50.25pt">
            <p class="label">
              <span class="readonlyText">{{
                eighteenScore == 0 ? "" : eighteenScore
              }}</span>
            </p>
          </td>
        </tr>
        <tr style="height: 14.15pt">
          <td style="width: 32.7pt">
            <p class="label">
              <span class="labelFont">19</span>
            </p>
          </td>
          <td rowspan="12" style="width: 22.95pt">
            <p style="margin: 0pt">
              <span class="labelFont">其他</span>
            </p>
          </td>
          <td colspan="2" style="width: 243.95pt">
            <p style="margin: 0pt">
              <span class="labelFont">考生身体探出车身外</span>
            </p>
          </td>
          <td style="width: 59.2pt">
            <p class="label">
              <span class="labelFont">扣</span><span class="labelFont">10</span
              ><span class="labelFont">分</span
              ><span class="labelFont">/次</span>
            </p>
          </td>
          <td style="vertical-align: top; width: 67.6pt">
            <p class="label">
              <span class="readonlyText">
                <input
                  type="number"
                  oninput="if(value<=0)value=''"
                  name=""
                  v-model="nineteenNum"
              /></span>
            </p>
          </td>
          <td style="vertical-align: top; width: 50.25pt">
            <p class="label">
              <span class="readonlyText">{{
                nineteenScore == 0 ? "" : nineteenScore
              }}</span>
            </p>
          </td>
        </tr>
        <tr style="height: 14.15pt">
          <td style="width: 32.7pt">
            <p class="label">
              <span class="labelFont">20</span>
            </p>
          </td>
          <td colspan="2" style="width: 243.95pt">
            <p style="margin: 0pt">
              <span class="labelFont">考生离开座位</span>
            </p>
          </td>
          <td style="width: 59.2pt">
            <p class="label">
              <span class="labelFont">扣</span><span class="labelFont">5</span
              ><span class="labelFont">分</span
              ><span class="labelFont">/次</span>
            </p>
          </td>
          <td style="vertical-align: top; width: 67.6pt">
            <p class="label">
              <span class="readonlyText">
                <input
                  type="number"
                  oninput="if(value<=0)value=''"
                  name=""
                  v-model="twentyNum"
              /></span>
            </p>
          </td>
          <td style="vertical-align: top; width: 50.25pt">
            <p class="label">
              <span class="readonlyText">{{
                twentyScore == 0 ? "" : twentyScore
              }}</span>
            </p>
          </td>
        </tr>
        <tr style="height: 14.15pt">
          <td style="width: 32.7pt">
            <p class="label">
              <span class="labelFont">21</span>
            </p>
          </td>
          <td colspan="2" style="width: 243.95pt">
            <p style="margin: 0pt">
              <span class="labelFont">未按考评员或考试系统的指示完成</span
              ><span class="labelFont">项目</span>
            </p>
          </td>
          <td style="width: 59.2pt">
            <p class="label">
              <span class="labelFont">不合格</span>
            </p>
          </td>
          <td style="vertical-align: top; width: 67.6pt">
            <p class="label">
              <span class="readonlyText">
                <input
                  type="number"
                  oninput="if(value<=0)value='';"
                  name=""
                  v-model="twentyOneNum"
              /></span>
            </p>
          </td>
          <td style="vertical-align: top; width: 50.25pt">
            <p class="label">
              <span class="readonlyText">{{
                twentyOneScore == 0 ? "" : twentyOneScore
              }}</span>
            </p>
          </td>
        </tr>
        <tr style="height: 14.15pt">
          <td style="width: 32.7pt">
            <p class="label">
              <span class="labelFont">22</span>
            </p>
          </td>
          <td colspan="2" style="width: 243.95pt">
            <p style="margin: 0pt">
              <span class="labelFont">未系安全带</span>
            </p>
          </td>
          <td style="width: 59.2pt">
            <p class="label">
              <span class="labelFont">不合格</span>
            </p>
          </td>
          <td style="vertical-align: top; width: 67.6pt">
            <p class="label">
              <span class="readonlyText">
                <input
                  type="number"
                  oninput="if(value<=0)value='';"
                  name=""
                  v-model="twentyTwoNum"
              /></span>
            </p>
          </td>
          <td style="vertical-align: top; width: 50.25pt">
            <p class="label">
              <span class="readonlyText">{{
                twentyTwoScore == 0 ? "" : twentyTwoScore
              }}</span>
            </p>
          </td>
        </tr>
        <tr style="height: 14.15pt">
          <td style="width: 32.7pt">
            <p class="label">
              <span class="labelFont">23</span>
            </p>
          </td>
          <td colspan="2" style="width: 243.95pt">
            <p style="margin: 0pt">
              <span class="labelFont">未完成规定项目</span>
            </p>
          </td>
          <td style="width: 59.2pt">
            <p class="label">
              <span class="labelFont">不合格</span>
            </p>
          </td>
          <td style="vertical-align: top; width: 67.6pt">
            <p class="label">
              <span class="readonlyText">
                <input
                  type="number"
                  oninput="if(value<=0)value='';"
                  name=""
                  v-model="twentyThreeNum"
              /></span>
            </p>
          </td>
          <td style="vertical-align: top; width: 50.25pt">
            <p class="label">
              <span class="readonlyText">{{
                twentyThreeScore == 0 ? "" : twentyThreeScore
              }}</span>
            </p>
          </td>
        </tr>
        <tr style="height: 14.15pt">
          <td style="width: 32.7pt">
            <p class="label">
              <span class="labelFont">24</span>
            </p>
          </td>
          <td colspan="2" style="width: 243.95pt">
            <p style="margin: 0pt">
              <span class="labelFont">规定项目未按规定路线行驶</span>
            </p>
          </td>
          <td style="width: 59.2pt">
            <p class="label">
              <span class="labelFont">不合格</span>
            </p>
          </td>
          <td style="vertical-align: top; width: 67.6pt">
            <p class="label">
              <span class="readonlyText">
                <input
                  type="number"
                  oninput="if(value<=0)value='';"
                  name=""
                  v-model="twentyFourNum"
              /></span>
            </p>
          </td>
          <td style="vertical-align: top; width: 50.25pt">
            <p class="label">
              <span class="readonlyText">{{
                twentyFourScore == 0 ? "" : twentyFourScore
              }}</span>
            </p>
          </td>
        </tr>
        <tr style="height: 14.15pt">
          <td style="width: 32.7pt">
            <p class="label">
              <span class="labelFont">25</span>
            </p>
          </td>
          <td colspan="2" style="width: 243.95pt">
            <p style="margin: 0pt">
              <span class="labelFont">熄火2次以上（含2次）</span>
            </p>
          </td>
          <td style="width: 59.2pt">
            <p class="label">
              <span class="labelFont">不合格</span>
            </p>
          </td>
          <td style="vertical-align: top; width: 67.6pt">
            <p class="label">
              <span class="readonlyText">
                <input
                  type="number"
                  oninput="if(value<=0)value='';"
                  name=""
                  v-model="twentyFiveNum"
              /></span>
            </p>
          </td>
          <td style="vertical-align: top; width: 50.25pt">
            <p class="label">
              <span class="readonlyText">{{
                twentyFiveScore == 0 ? "" : twentyFiveScore
              }}</span>
            </p>
          </td>
        </tr>
        <tr style="height: 14.15pt">
          <td style="width: 32.7pt">
            <p class="label">
              <span class="labelFont">26</span>
            </p>
          </td>
          <td colspan="2" style="width: 243.95pt">
            <p style="margin: 0pt">
              <span class="labelFont">违反厂区内道路行驶规定</span>
            </p>
          </td>
          <td style="width: 59.2pt">
            <p class="label">
              <span class="labelFont">不合格</span>
            </p>
          </td>
          <td style="vertical-align: top; width: 67.6pt">
            <p class="label">
              <span class="readonlyText">
                <input
                  type="number"
                  oninput="if(value<=0)value='';"
                  name=""
                  v-model="twentySixNum"
              /></span>
            </p>
          </td>
          <td style="vertical-align: top; width: 50.25pt">
            <p class="label">
              <span class="readonlyText">{{
                twentySixScore == 0 ? "" : twentySixScore
              }}</span>
            </p>
          </td>
        </tr>
        <tr style="height: 14.15pt">
          <td style="width: 32.7pt">
            <p class="label">
              <span class="labelFont">27</span>
            </p>
          </td>
          <td colspan="2" style="width: 243.95pt">
            <p style="margin: 0pt">
              <span class="labelFont">坡道起步时，溜车大于0.5m</span>
            </p>
          </td>
          <td style="width: 59.2pt">
            <p class="label">
              <span class="labelFont">不合格</span>
            </p>
          </td>
          <td style="vertical-align: top; width: 67.6pt">
            <p class="label">
              <span class="readonlyText">
                <input
                  type="number"
                  oninput="if(value<=0)value='';"
                  name=""
                  v-model="twentySevenNum"
              /></span>
            </p>
          </td>
          <td style="vertical-align: top; width: 50.25pt">
            <p class="label">
              <span class="readonlyText">{{
                twentySevenScore == 0 ? "" : twentySevenScore
              }}</span>
            </p>
          </td>
        </tr>
        <tr style="height: 14.15pt">
          <td style="width: 32.7pt">
            <p class="label">
              <span class="labelFont">28</span>
            </p>
          </td>
          <td colspan="2" style="width: 243.95pt">
            <p style="margin: 0pt">
              <span class="labelFont">紧急情况处理不当</span>
            </p>
          </td>
          <td style="width: 59.2pt">
            <p class="label">
              <span class="labelFont">不合格</span>
            </p>
          </td>
          <td style="vertical-align: top; width: 67.6pt">
            <p class="label">
              <span class="readonlyText">
                <input
                  type="number"
                  oninput="if(value<=0)value='';"
                  name=""
                  v-model="twentyEightNum"
              /></span>
            </p>
          </td>
          <td style="vertical-align: top; width: 50.25pt">
            <p class="label">
              <span class="readonlyText">{{
                twentyEightScore == 0 ? "" : twentyEightScore
              }}</span>
            </p>
          </td>
        </tr>
        <tr style="height: 14.15pt">
          <td style="width: 32.7pt">
            <p class="label">
              <span class="labelFont">29</span>
            </p>
          </td>
          <td colspan="2" style="width: 243.95pt">
            <p style="margin: 0pt">
              <span class="labelFont">碰倒桩杆</span>
            </p>
          </td>
          <td style="width: 59.2pt">
            <p class="label">
              <span class="labelFont">不合格</span>
            </p>
          </td>
          <td style="vertical-align: top; width: 67.6pt">
            <p class="label">
              <span class="readonlyText">
                <input
                  type="number"
                  oninput="if(value<=0)value='';"
                  name=""
                  v-model="twentyNineNum"
              /></span>
            </p>
          </td>
          <td style="vertical-align: top; width: 50.25pt">
            <p class="label">
              <span class="readonlyText">{{
                twentyNineScore == 0 ? "" : twentyNineScore
              }}</span>
            </p>
          </td>
        </tr>
        <tr style="height: 14.15pt">
          <td style="width: 32.7pt">
            <p class="label">
              <span class="labelFont">30</span>
            </p>
          </td>
          <td colspan="2" style="width: 243.95pt">
            <p style="margin: 0pt">
              <span class="labelFont">轮胎整体出线</span>
            </p>
          </td>
          <td style="width: 59.2pt">
            <p class="label">
              <span class="labelFont">不合格</span>
            </p>
          </td>
          <td style="vertical-align: top; width: 67.6pt">
            <p class="label">
              <span class="readonlyText">
                <input
                  type="number"
                  oninput="if(value<=0)value='';"
                  name=""
                  v-model="thirtyNum"
              /></span>
            </p>
          </td>
          <td style="vertical-align: top; width: 50.25pt">
            <p class="label">
              <span class="readonlyText">{{
                thirtyScore == 0 ? "" : thirtyScore
              }}</span>
            </p>
          </td>
        </tr>
        <tr style="height: 39.55pt">
          <td colspan="2" style="width: 66.45pt">
            <p class="label">
              <span class="labelFont">现场考评人员</span>
            </p>
          </td>
          <td colspan="5" style="width: 453.4pt">
            <p style="line-height: 12pt; margin: 0pt; orphans: 0; widows: 0">
              <span
                style="font-family: 宋体; font-size: 10pt; font-weight: bold"
              ></span
              ><span
                style="font-family: 宋体; font-size: 10pt; font-weight: normal"
              ></span
              ><span
                style="font-family: 宋体; font-size: 10pt; font-weight: bold"
              >
              </span>
            </p>
            <p class="label">
              <Upload @clickUpload="clickUpload"></Upload>
              <span class="labelFont">{{ currentDate }}</span>
            </p>
          </td>
        </tr>
      </table>
      <button class="submitBtn" @click="updateRecord">提交</button>
    </div>
    <div style="display: none">
      <video ref="video" autoplay></video>
      <button @click="takePhoto">拍照</button>
      <canvas ref="canvas" style="display: none"></canvas>
    </div>
  </div>
</template>

<script>
import { getCurrentDate, updateCurrentTime } from "../../utils/getTime";
import vueEsign from "../../components/VueEsign.vue";
import Checked from "../../components/checked.vue";
import Upload from "../../components/upload.vue";
import MessageBox from "../../components/messageBox.vue";
import $api from "../../utils/api";
export default {
  components: {
    vueEsign,
    Checked,
    Upload,
    MessageBox,
  },
  data() {
    return {
      stream: null,
      imgSrc: "",
      uploadFlag: false,
      // 考生个人信息
      examCandidate: "",
      // 考试所有题目
      question: "",
      // 考试科目信息
      examRecord: "",
      // 考试题目标题
      questionTypeNameArr: [],
      // 考试题目分类
      questionArr1: [],
      questionArr2: [],
      questionArr3: [],
      questionArr4: [],
      //得分
      oneNum: "",
      oneScore: "",
      twoNum: "",
      twoScore: "",
      threeNum: "",
      threeScore: "",
      fourNum: "",
      fourScore: "",
      fiveNum: "",
      fiveScore: "",
      sixNum: "",
      sixScore: "",
      sevenNum: "",
      sevenScore: "",
      eightNum: "",
      eightScore: "",
      nineNum: "",
      nineScore: "",
      tenNum: "",
      tenScore: "",
      elevenNum: "",
      elevenScore: "",
      twelveNum: "",
      twelveScore: "",
      thirteenNum: "",
      thirteenScore: "",
      fourteenNum: "",
      fourteenScore: "",
      fifteenNum: "",
      fifteenScore: "",
      sixteenNum: "",
      sixteenScore: "",
      seventeenNum: "",
      seventeenScore: "",
      eighteenNum: "",
      eighteenScore: "",
      nineteenNum: "",
      nineteenScore: "",
      twentyNum: "",
      twentyScore: "",
      twentyOneNum: "",
      twentyOneScore: "",
      twentyTwoNum: "",
      twentyTwoScore: "",
      twentyThreeNum: "",
      twentyThreeScore: "",
      twentyFourNum: "",
      twentyFourScore: "",
      twentyFiveNum: "",
      twentyFiveScore: "",
      twentySixNum: "",
      twentySixScore: "",
      twentySevenNum: "",
      twentySevenScore: "",
      twentyEightNum: "",
      twentyEightScore: "",
      twentyNineNum: "",
      twentyNineScore: "",
      thirtyNum: "",
      thirtyScore: "",
      recordId: "",
      workType: "",
    };
  },
  computed: {
    sum() {
      // 使用 Number 函数确保结果为数字类型
      let result =
        100 -
        (Number(this.oneScore) +
          Number(this.twoScore) +
          Number(this.threeScore) +
          Number(this.fourScore) +
          Number(this.fiveScore) +
          Number(this.sixScore) +
          Number(this.sevenScore) +
          Number(this.eightScore) +
          Number(this.nineScore) +
          Number(this.tenScore) +
          Number(this.elevenScore) +
          Number(this.twelveScore) +
          Number(this.thirteenScore) +
          Number(this.fourteenScore) +
          Number(this.fifteenScore) +
          Number(this.sixteenScore) +
          Number(this.seventeenScore) +
          Number(this.eighteenScore) +
          Number(this.nineteenScore) +
          Number(this.twentyScore) +
          Number(this.twentyOneScore) +
          Number(this.twentyTwoScore) +
          Number(this.twentyThreeScore) +
          Number(this.twentyFourScore) +
          Number(this.twentyFiveScore) +
          Number(this.twentySixScore) +
          Number(this.twentySevenScore) +
          Number(this.twentyEightScore) +
          Number(this.twentyNineScore) +
          Number(this.thirtyScore));
      return result;
    },
  },
  watch: {
    oneScore(o, n) {
      this.takePhoto(1);
    },
    twentyNum(o, n) {
      this.takePhoto(2);
    },
    oneNum(newVal, oldVal) {
      this.oneScore = newVal * 2;
    },
    twoNum(newVal, oldVal) {
      this.twoScore = newVal * 2;
    },
    threeNum(newVal, oldVal) {
      this.threeScore = newVal * 5;
    },
    fourNum(newVal, oldVal) {
      this.fourScore = newVal * 5;
    },
    fiveNum(newVal, oldVal) {
      this.fiveScore = newVal * 5;
    },
    sixNum(newVal, oldVal) {
      this.sixScore = newVal * 5;
    },
    sevenNum(newVal, oldVal) {
      this.sevenScore = newVal * 5;
    },
    eightNum(newVal, oldVal) {
      this.eightScore = newVal * 5;
    },
    nineNum(newVal, oldVal) {
      this.nineScore = newVal * 5;
    },
    tenNum(newVal, oldVal) {
      this.tenScore = newVal * 10;
    },
    elevenNum(newVal, oldVal) {
      this.elevenScore = newVal * 15;
    },
    twelveNum(newVal, oldVal) {
      this.twelveScore = newVal * 10;
    },
    thirteenNum(newVal, oldVal) {
      this.thirteenScore = newVal * 10;
    },
    fourteenNum(newVal, oldVal) {
      this.fourteenScore = newVal * 10;
    },
    fifteenNum(newVal, oldVal) {
      this.fifteenScore = newVal * 10;
    },
    sixteenNum(newVal, oldVal) {
      this.sixteenScore = newVal * 5;
    },
    seventeenNum(newVal, oldVal) {
      this.seventeenScore = newVal * 5;
    },
    eighteenNum(newVal, oldVal) {
      this.eighteenScore = newVal * 5;
    },
    nineteenNum(newVal, oldVal) {
      this.nineteenScore = newVal * 10;
    },
    twentyNum(newVal, oldVal) {
      this.twentyScore = newVal * 5;
    },
    twentyOneNum(newVal, oldVal) {
      this.twentyOneScore = 100;
    },
    twentyTwoNum(newVal, oldVal) {
      this.twentyTwoScore = 100;
    },
    twentyThreeNum(newVal, oldVal) {
      this.twentyThreeScore = 100;
    },
    twentyFourNum(newVal, oldVal) {
      this.twentyFourScore = 100;
    },
    twentyFiveNum(newVal, oldVal) {
      this.twentyFiveScore = 100;
    },
    twentySixNum(newVal, oldVal) {
      this.twentySixScore = 100;
    },
    twentySevenNum(newVal, oldVal) {
      this.twentySevenScore = 100;
    },
    twentyEightNum(newVal, oldVal) {
      this.twentyEightScore = 100;
    },
    twentyNineNum(newVal, oldVal) {
      this.twentyNineScore = 100;
    },
    thirtyNum(newVal, oldVal) {
      this.thirtyScore = 100;
    },
  },
  created() {
    // 清空缓存imgUrl2
    localStorage.removeItem("imgUrl2");
    this.userInfo = JSON.parse(localStorage.getItem("data"));
    this.recordId = this.userInfo.examRecord.id;
    this.workType = this.userInfo.examRecord.workType;
    this.examCandidate = this.userInfo.examCandidate;
    this.question = this.userInfo.question;
    this.examRecord = this.userInfo.examRecord;
    // this.questionType(this.userInfo.question);
    this.currentDate = getCurrentDate(); // 默认格式 'YYYY-MM-DD'
    this.openCamera();
  },
  methods: {
    async openCamera() {
      try {
        this.stream = await navigator.mediaDevices.getUserMedia({
          video: true,
        });
        this.$refs.video.srcObject = this.stream;
      } catch (error) {
        console.error("无法打开摄像头", error);
      }
    },
    takePhoto(times) {
      const video = this.$refs.video;
      const canvas = this.$refs.canvas;
      canvas.width = video.videoWidth;
      canvas.height = video.videoHeight;
      canvas.getContext("2d").drawImage(video, 0, 0);
      this.imgSrc = canvas.toDataURL("image/png");
      switch (times) {
        case 1:
          localStorage.setItem("examinerImg1", this.imgSrc);
          break;
        case 2:
          localStorage.setItem("examinerImg2", this.imgSrc);
          break;
        case 3:
          localStorage.setItem("examinerImg3", this.imgSrc);
          break;
      }
    },
    clickUpload(e) {
      this.uploadFlag = e;
      this.takePhoto(3);
    },
    questionType(question) {
      // 获取考试题目标题和题目
      let questionTypeNameArr = [];
      question.forEach((item) => {
        if (questionTypeNameArr.indexOf(item.questionTypeName) == "-1") {
          questionTypeNameArr.push(item.questionTypeName);
        }
      });
      this.questionTypeNameArr = questionTypeNameArr;

      let questionArr1 = [];
      let questionArr2 = [];
      let questionArr3 = [];
      let questionArr4 = [];
      question.forEach((item) => {
        if (item.questionTypeName == questionTypeNameArr[0]) {
          questionArr1.push(item);
        }
        if (item.questionTypeName == questionTypeNameArr[1]) {
          questionArr2.push(item);
        }
        if (item.questionTypeName == questionTypeNameArr[2]) {
          questionArr3.push(item);
        }
        if (item.questionTypeName == questionTypeNameArr[3]) {
          questionArr4.push(item);
        }
      });
      this.questionArr1 = questionArr1;
      this.questionArr2 = questionArr2;
      this.questionArr3 = questionArr3;
      this.questionArr4 = questionArr4;
    },
    updateRecord() {
      let examRecord = this.examRecord;
      let examinerImg1 = localStorage.getItem("examinerImg1");
      let examinerImg2 = localStorage.getItem("examinerImg2");
      let examinerImg3 = localStorage.getItem("examinerImg3");

      if (examRecord && examRecord.status !== "2") {
        if (
          localStorage.getItem("imgUrl1") &&
          localStorage.getItem("imgUrl2") &&
          this.uploadFlag
        ) {
          examRecord.assessor1 = localStorage.getItem("imgUrl1");
          examRecord.assessor2 = localStorage.getItem("imgUrl2");
        } else {
          this.$alert("请上传签名", "提示", {
            confirmButtonText: "确定",
            callback: (action) => {},
          });
          return;
        }
      }
      let dataInfo = {
        examinerImg1: examinerImg1,
        examinerImg2: examinerImg2,
        examinerImg3: examinerImg3,
        number: this.examCandidate.number,
        candidateName: this.examCandidate.name,
        sfzNumber: this.examCandidate.sfzNumber,
        batchName: this.examCandidate.batchNumber,
        score: this.sum < 0 ? 0 : this.sum,
        assessor1: examRecord.assessor1,
        assessor2: examRecord.assessor2,
        examDate: getCurrentDate(),
        workType: this.workType,
        id: this.recordId,
        status: "1",
        recordStr: "",
      };
      let dataJson = {
        oneNum: this.oneNum,
        twoNum: this.twoNum,
        threeNum: this.threeNum,
        fourNum: this.fourNum,
        fiveNum: this.fiveNum,
        sixNum: this.sixNum,
        sevenNum: this.sevenNum,
        eightNum: this.eightNum,
        nineNum: this.nineNum,
        tenNum: this.tenNum,
        elevenNum: this.elevenNum,
        twelveNum: this.twelveNum,
        thirteenNum: this.thirteenNum,
        fourteenNum: this.fourteenNum,
        fifteenNum: this.fifteenNum,
        sixteenNum: this.sixteenNum,
        seventeenNum: this.seventeenNum,
        eighteenNum: this.eighteenNum,
        nineteenNum: this.nineteenNum,
        twentyNum: this.twentyNum,
        twentyOneNum: this.twentyOneNum,
        twentyTwoNum: this.twentyTwoNum,
        twentyThreeNum: this.twentyThreeNum,
        twentyFourNum: this.twentyFourNum,
        twentyFiveNum: this.twentyFiveNum,
        twentySixNum: this.twentySixNum,
        twentySevenNum: this.twentySevenNum,
        twentyEightNum: this.twentyEightNum,
        twentyNineNum: this.twentyNineNum,
        thirtyNum: this.thirtyNum,
        oneScore: this.oneScore,
        twoScore: this.twoScore,
        threeScore: this.threeScore,
        fourScore: this.fourScore,
        fiveScore: this.fiveScore,
        sixScore: this.sixScore,
        sevenScore: this.sevenScore,
        eightScore: this.eightScore,
        nineScore: this.nineScore,
        tenScore: this.tenScore,
        elevenScore: this.elevenScore,
        twelveScore: this.twelveScore,
        thirteenScore: this.thirteenScore,
        fourteenScore: this.fourteenScore,
        fifteenScore: this.fifteenScore,
        sixteenScore: this.sixteenScore,
        seventeenScore: this.seventeenScore,
        eighteenScore: this.eighteenScore,
        nineteenScore: this.nineteenScore,
        twentyScore: this.twentyScore,
        twentyOneScore: this.twentyOneScore,
        twentyTwoScore: this.twentyTwoScore,
        twentyThreeScore: this.twentyThreeScore,
        twentyFourScore: this.twentyFourScore,
        twentyFiveScore: this.twentyFiveScore,
        twentySixScore: this.twentySixScore,
        twentySevenScore: this.twentySevenScore,
        twentyEightScore: this.twentyEightScore,
        twentyNineScore: this.twentyNineScore,
        thirtyScore: this.thirtyScore,
      };
      dataInfo.recordStr = JSON.stringify(dataJson);
      $api.updateRecord(dataInfo).then((res) => {
        if (res.data.code == "200") {
          this.$message({
            type: "success",
            message: "提交成功!",
          });
          this.$router.push({
            name: "home",
          });
        }
      });
    },
  },
};
</script>
<style lang="less" scoped>
@import "./css/index.less";
.el-dialog__headerbtn .el-dialog__close {
  display: none;
}
input {
  height: 30px !important;
}
</style>
